exports.getMapLocation = function (req, res) {

    //获取restful参数
    var restfulParams = req.routeInfo.restfulParams;

    //最终结果
    var resultData = {};

    //任务流创建
    async.waterfall([

           
            function (cb) {

                console.log(restfulParams)

                var url = "http://api.map.baidu.com/geocoder/v2/?ak=EfmOW4Bepqzh9mFG0taLRA34FgpViwRQ&location="+restfulParams.lng+","+restfulParams.lat+"&output=json&pois=1";

                ////console.log(url);
                
                R.SEND_HTTP(
                    req,
                    {
                        url: url,
                        method: 'GET'
                    },
                    function (err, data) {

                        console.log(data);
                        
                        if(resultData = data.result.pois.length > 0){
                            resultData = data.result.pois[0].name;
                        }
                        
                        cb();

                    }
                ,true);
                

            }


        ], function (err, result) {

            //返回最终拼接结果
            RES.response(res, true, resultData);

        }
    );

};